package springinaction.springidol;

import java.util.Collection;

/**
 * Человек-оркестр
 *
 */

public class OneManBand implements Performer {

	private Collection<Instrument> instruments;
	
	@Override
	public void perform() throws PerformanceException {
		for (Instrument instrument : instruments) {
			instrument.play();
		}
	}
		
	public void setInstruments(Collection<Instrument> instruments) {
		this.instruments = instruments; // Внедрение коллекции инструментов
	}

}
